﻿namespace System;
/// <summary>
/// 
/// </summary>
/// <typeparam name="T"></typeparam>
internal sealed class ExpressionSpecification<T> : Specification<T>
{
    #region Private Fields
    /// <summary>
    /// 
    /// </summary>
    private readonly Expression<Func<T, bool>> expression;
    #endregion
    #region Ctor
    /// <summary>
    /// 
    /// </summary>
    /// <param name="expression"></param>
    public ExpressionSpecification(Expression<Func<T, bool>> expression)
    {
        this.expression = expression;
    }
    #endregion
    #region Public Methods
    /// <summary>
    /// 
    /// </summary>
    /// <returns></returns>
    public override Expression<Func<T, bool>> GetExpression() => this.expression;
    #endregion
}
